package com.systemmanger.mapper;

import com.bean.WmsTGroup;
import com.bean.WmsTUser;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * @AUTHOR(闫晨航)
 * @date2021-12-07 18:47
 */
public interface GroupMapper {
    @Select("select * from wms_t_group where groupIsDel='0'")
    public List<WmsTGroup> getAllGroups();
    @Select("<script>select * from wms_t_group\n" +
            "        where 1=1\n" +
            "        <if test=\"groupName!=null\">\n" +
            "            and groupName = #{groupName}\n" +
            "        </if>\n" +
            "        <if test=\"groupID!=null\">\n" +
            "            and groupID = #{groupID}\n" +
            "        </if> and groupIsDel='0'\n" +
            "</script>")
    List<WmsTGroup> getGroups(Map<String, Object> map);
    @Select("select * from wms_t_group where groupID = #{value}")
    public WmsTGroup getOneGroup(String groupId);

}
